
/**
 * @Project : Clion_ProgrammingExercises
 * @File : 2
 * @Author : WangRuoyu 
 * @Date : 2023/5/17 15:04
 */

#include "iostream"

using namespace std;

struct point {
    int x;
    int y;
};

int dx[8] = {0, 1, 0, -1, -1, 1, 1, -1};
int dy[8] = {1, 0, -1, 0, 1, 1, -1, -1};

int main() {
    int n;
    cin >> n;
    point points[n];
    for (int i = 0; i < n; ++i) {
        cin >> points[i].x >> points[i].y;
    }

    int res[5] = {0};
    for (int i = 0; i < n; ++i) {
        int a = 0;
        int b = 0;
        for (int j = 0; j < n; ++j) {
            for (int k = 0; k < 4; ++k) {
                if (points[i].x == points[j].x + dx[k] && points[i].y == points[j].y + dy[k]) {
                    a++;
                }
            }
            for (int k = 4; k < 8; ++k) {
                if (points[i].x == points[j].x + dx[k] && points[i].y == points[j].y + dy[k]) {
                    b++;
                }
            }
        }
        if (a == 4) {
            res[b]++;
        }
    }

    for (int i = 0; i < 5; ++i) {
        cout << res[i] << endl;
    }
    return 0;
}